#include "stdafx.h"
#include "StateTest.h"
#include "Globals.h"
#include "StateManager.h"
#include "Game.h"

StateTest::StateTest()
{
	//start = new Button2D();
	//start->setProperties(1, Vector3(4.0f, 2.0f, 4.0f));
	//start->setProperties(0, Vector3(0.0f, 0.0f, -30.0f));
	///*start->SetBackGround("../Resources/Textures/Dirt.tga");*/
	//start->SetTexture(ResourceManager::GetInstance()->buttonBackGround, 0);
	//start->SetShader(Globals::resourceManager->triangleShader);
	//this->AddEntity(start);

	//start = new Button2D();
	//start->SetScaleFactor(Vector3(4.0f, 2.0f, 4.0f));
	//start->SetPositon(Vector3(0.0f, -4.0f, -30.0f));
	//start->SetTexture(ResourceManager::GetInstance()->buttonBackGround, 0);
	////start->SetBackGround("../Resources/Textures/Dirt.tga");
	//start->SetShader(Globals::resourceManager->triangleShader);
	//this->AddEntity(start);

	//start = new Button2D();
	//start->SetScaleFactor(Vector3(4.0f, 2.0f, 4.0f));
	//start->SetPositon(Vector3(0.0f, -4.0f, -30.0f));
	//start->SetTexture(ResourceManager::GetInstance()->buttonBackGround, 0);
	////start->SetBackGround("../Resources/Textures/Dirt.tga");
	//start->SetShader(Globals::resourceManager->triangleShader);
	//this->AddEntity(start);

}

StateTest::~StateTest()
{

}

void StateTest::Key(ESContext *esContext, unsigned char key, bool bIsPressed)
{
	switch (key){
	case 8:
		StateManager::GetInstance()->currentState = StateManager::GetInstance()->GetState(0);
		break;
	
		/*case 'W':
		Globals::currentCamera->MoveForward(10.0f);
		break;
		case 'S':
		Globals::currentCamera->MoveBackward(10.0f);
		break;
		case 'A':
		Globals::currentCamera->MoveLeft(1000.0f);
		break;
		case 'D':
		Globals::currentCamera->MoveRight(1000.0f);
		break;
		case 38:
		Globals::currentCamera->RotateUp(3.14f / 90);
		break;
		case 40:
		Globals::currentCamera->RotateDown(3.14f / 90);
		break;
		case 39:
		Globals::currentCamera->RotateRight(0.05f);
		break;
		case 37:
		Globals::currentCamera->RotateLeft(0.05f);
		break;*/
	}
}

void StateTest::Update(ESContext* esContext, float deltatime)
{
	//start->RotateUp(0.1f);
	//start->Update(esContext, deltatime);
}

void StateTest::Draw(ESContext* esContext)
{
	State::Draw(esContext);
}

